package com.xq.service.impl;

import com.xq.dao.UserDao;
import com.xq.pojo.User;
import com.xq.service.UserService;

/**
 * @author xq
 * @version 1.0
 * @date 2021/4/5 15:13
 * @description 用户业务接口实现层
 */
public class UserServiceImpl implements UserService {

    private UserDao userDao ;

    /**
     * Spring容器要通过setXXX方法来把容器里面的对象注入到这个UserDao类
     * @param userDao 用户服务层对象
     */
    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    @Override
    public User getUserById(Integer id) {
        return userDao.getUserById(id);
    }

}


